﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CrmOrderProductReport.aspx.cs" Inherits="ZX.WebApp.DeskTop.DeskTopItem.CrmOrderProductReport" %>

<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>产品、已交付、未交付、交付中统计报表</title>
    <script src="../../Scripts/Public.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1-vsdoc.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
    <style type="text/css">
        .tableContent
        {
            width: 100%;  font-size:12px;
            color:border-collapse: collapse;
        }
        .tableContent th
        {
            border: solid 1px #D4DBE2;
            font-weight: bold;
            background-color: #F2F8FF;
            white-space: nowrap;
            line-height: 25px;
            text-align: left; padding-left:3px;
        }
        .tableContent td
        {
            border: solid 1px #D4DBE2;
            background-color: #F2F8FF;
            line-height: 25px;
            text-align: left;
            padding-left:3px;
        }
    </style>
    <script type="text/javascript">
        var htmlTemp = "";
        $(document).ready(function () {
            htmlTemp = "";
            htmlTemp = "<table class='tableContent'>";
            htmlTemp += "<tr align='center' style=' font-weight:bold;'>";
            htmlTemp += "    <td style='width:25%;'>产品名称</td>";
            htmlTemp += "    <td style='width:25%; color:Blue;'>未交付</td>";
            htmlTemp += "    <td style='width:25%; color:Blue;'>交付中</td>";
            htmlTemp += "    <td style='width:25%; color:Blue;'>已交付</td></tr>";
            LoadData();
        });

        function LoadData() {
            var pt = getPar1("ProductType");
            if (pt == "") pt = null;
            
            $.ajax({
                type: "get",
                url: "CrmOrderProductReport.aspx?getdata=1&PowerType=" + getPar1("PowerType") + "&ProductType=" + getPar1("ProductType") + "&r=" + Math.random(),
                beforeSend: function (XMLHttpRequest) {
                    $("#filterDiv").show();
                },
                success: function (data, textStatus) {
                    var myhtml = htmlTemp;
                    var cacheHtml = "";
                    if (data.length > 0) {
                        for (var i = 0; i < data.length; i++) {
                            myhtml += "<tr><td>" + data[i].Caption + "</td>";
                            myhtml += "<td style='color:Blue;'>" + data[i].未交付 + "</td>";
                            myhtml += "<td style='color:Blue;'>" + data[i].交付中 + "</td>";
                            myhtml += "<td style='color:Blue;'>" + data[i].已交付 + "</td></tr>";
                        }
                        cacheHtml = myhtml;
                    }
                    else cacheHtml = myhtml + "<tr><td colspan='4'>没有数据...</td>";
                    $("#tbList").html(cacheHtml);
                },
                complete: function (XMLHttpRequest, textStatus) {
                    $("#filterDiv").hide();
                },
                error: function () {
                    //请求出错处理
                }
            });
        };
    </script>
</head>
<body>
    <div id="filterDiv" style="width:85px;height:25px;float:right;">
        <img src="../../Scripts/JQuery_zTree_v3.3/css/zTreeStyle/img/loading.gif" />&nbsp;&nbsp;加载中......
    </div>
    <form id="form1" runat="server">
    <div>
        <div id="tbList"></div>
    </div>
    </form>
</body>
</html>--%>